/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package day06;

import java.util.Date;

/**
 *
 * @author Administrator
 */
public class Account {
    private String accNumber;
    private String accName;
    private Date createdDate;
    
    public Account(String accNumber){
        this.accNumber = accNumber;
    }
    
    public Account (String accNumber, String accName){
        this.accNumber = accNumber;
        this.accName   = accName;    
    }
    public Account(String accNumber, String accName, Date createdDate){
        this.accNumber   = accNumber;
        this.accName     = accName;
        this.createdDate = createdDate;   
    }
    /*
     * in ra
     */
    public void print(){
        System.out.println(this.accNumber +" "+ this.accName);    
    }
    /*
     * In ra
     */
    public void print(String accNumber){
        if(this.accNumber.equals(accNumber)){
            System.out.println(this.accName +"," + this.createdDate);        
        }
        else
        {
          System.out.println(this.accNumber);        
        }
    
    }
    /*
     * In ra
     */
    public void print(int accNumber){
        if(this.accNumber.equals(String.valueOf(accNumber))){
            System.out.println(this.createdDate);        
        }
        else {
            System.out.println(this.accName);
        
        }    
    }  
    
}
